import { lazy } from "react";
import {createBrowserRouter} from 'react-router-dom'
import Login from '../luyou/login/Index'
import Layout from '../luyou/layout/Index'
import Loginzc from '../luyou/loginzc/Index'
import No from '../luyou/404/Index'
const Home =lazy(()=>import('../luyou/home/Index'))
const Table =lazy(()=>import('../luyou/table/Index'))
const Look =lazy(()=>import('../luyou/look/Index'))
export const erji=[
    {
        path:'/home',
        title:'首页',
        element:<Home></Home>,
    },
    {
          path:'/table',
          title:'列表',
        element:<Table></Table>,
    },
     {
          path:'/look',
          title:'黑白',
        element:<Look></Look>,
    }
]
const router =createBrowserRouter([
    {
        path:'/',
        element:<Layout></Layout>,
        children:erji
    },
    {
        path:'/login',
        element:<Login></Login>
    },
     {
        path:'/loginzc',
        element:<Loginzc></Loginzc>
    },
    {
        path:'*',
        element:<No></No>
    }
])
export default router
